﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display {
    import flash.display.*;
    import org.aswing.*;
    import Classes.*;
    import flash.text.*;

    public class ToolTipSchema {

        public static var TOOLTIP_SCHEMA_DEFAULT:ToolTipSchema = new ToolTipSchema(EmbeddedArt.TITLE_FONT, EmbeddedArt.DEFAULT_FONT_NAME_BOLD, EmbeddedArt.whiteTextColor, EmbeddedArt.whiteTextColor, 18, 12, EmbeddedArt.commonBlackFilter, EmbeddedArt.commonBlackFilter);
;
        public static var TOOLTIP_SCHEMA_NORMAL:ToolTipSchema = new ToolTipSchema(EmbeddedArt.TITLE_FONT, EmbeddedArt.DEFAULT_FONT_NAME_BOLD, EmbeddedArt.whiteTextColor, EmbeddedArt.darkBrownTextColor, 18, 12, EmbeddedArt.toolTipNormalTitleFilters, null, EmbeddedArt.tooltip_bg_blue, SoftBoxLayout.LEFT, true);
;
        public static var TOOLTIP_SCHEMA_FRANCHISE:ToolTipSchema = new ToolTipSchema(EmbeddedArt.TITLE_FONT, EmbeddedArt.DEFAULT_FONT_NAME_BOLD, EmbeddedArt.whiteTextColor, EmbeddedArt.darkBrownTextColor, 18, 12, EmbeddedArt.toolTipFranchiseTitleFilters, null, EmbeddedArt.tooltip_bg_orange, SoftBoxLayout.LEFT, true);
;

        protected var m_titleFontName:String;
        protected var m_bodyFontName:String;
        protected var m_titleFontColor:uint;
        protected var m_bodyFontColor:uint;
        protected var m_titleFontSize:Number;
        protected var m_bodyFontSize:Number;
        protected var m_bgAsset:DisplayObject;
        protected var m_tailBgAsset:DisplayObject;
        protected var m_titleFilters:Array;
        protected var m_bodyTextFilters:Array;
        protected var m_innerAlign:int;
        protected var m_useTail:Boolean;

        public function ToolTipSchema(_arg1:String, _arg2:String, _arg3:uint, _arg4:uint, _arg5:Number, _arg6:Number, _arg7:Array=null, _arg8:Array=null, _arg9:Class=null, _arg10:int=0, _arg11:Boolean=false){
            this.m_titleFontName = _arg1;
            this.m_bodyFontName = _arg2;
            this.m_titleFontColor = _arg3;
            this.m_bodyFontColor = _arg4;
            this.m_titleFontSize = _arg5;
            this.m_bodyFontSize = _arg6;
            this.m_titleFilters = (_arg7) ? _arg7 : [];
            this.m_bodyTextFilters = (_arg8) ? _arg8 : [];
            this.m_innerAlign = _arg10;
            this.m_useTail = _arg11;
            this.m_bgAsset = (_arg9) ? (new (_arg9)() as DisplayObject) : null;
            this.m_tailBgAsset = (this.m_bgAsset) ? (((this.m_bgAsset is EmbeddedArt.tooltip_bg_blue)) ? new EmbeddedArt.tooltip_tail_blue() : new EmbeddedArt.tooltip_tail_orange() as DisplayObject) : null;
        }
        public static function getSchemaForObject(_arg1:IToolTipTarget):ToolTipSchema{
            if ((((_arg1 is ICustomToolTipTarget)) && (!((_arg1 is Wilderness))))){
                if ((_arg1 is Business)){
                    if ((_arg1 as Business).isFranchise()){
                        return (TOOLTIP_SCHEMA_FRANCHISE);
                    };
                };
                return (TOOLTIP_SCHEMA_NORMAL);
            };
            return (TOOLTIP_SCHEMA_DEFAULT);
        }

        public function get titleFontName():String{
            return (this.m_titleFontName);
        }
        public function get bodyFontName():String{
            return (this.m_bodyFontName);
        }
        public function get titleFontColor():uint{
            return (this.m_titleFontColor);
        }
        public function get bodyFontColor():uint{
            return (this.m_bodyFontColor);
        }
        public function get titleFontSize():Number{
            return (this.m_titleFontSize);
        }
        public function get bodyFontSize():Number{
            return (this.m_bodyFontSize);
        }
        public function get titleFilters():Array{
            return (this.m_titleFilters);
        }
        public function get bodyTextFilters():Array{
            return (this.m_bodyTextFilters);
        }
        public function get innerAlign():int{
            return (this.m_innerAlign);
        }
        public function get useTail():Boolean{
            return (this.m_useTail);
        }
        public function get backgroundAsset():DisplayObject{
            return (this.m_bgAsset);
        }
        public function get tailAsset():DisplayObject{
            return (this.m_tailBgAsset);
        }
        public function get stringAlignment():String{
            switch (this.innerAlign){
                case SoftBoxLayout.CENTER:
                    return (TextFormatAlign.CENTER);
                case SoftBoxLayout.LEFT:
                    return (TextFormatAlign.LEFT);
                case SoftBoxLayout.RIGHT:
                    return (TextFormatAlign.RIGHT);
            };
            return (TextFormatAlign.CENTER);
        }

    }
}//package Display 
